This sample program illustrates how to use the image editing toolbar functions programmatically.

1. To enable the image editing toolbar, you must set the Edit interface's EditEnable property to True then call the ShowToolBar method. For example, to enable the raster image editing toolbar, you could do this....

    ImageKit1.Edit.EditEnable = True
    ImageKit1.Edit.ShowToolBar ikRaster

2. To set the position of the toolbar on the screen and set some other properties......

    ImageKit1.Edit.ToolBarCloseBox = True
    ImageKit1.Edit.ToolBarCaption = "Edit"
    ImageKit1.Edit.ToolBarLeft = 50
    ImageKit1.Edit.ToolBarTop = 50

3. To disable the toolbar you can set the EditEnable property to False

    ImageKit1.Edit.EditEnable = False

or you can call the ShowToolBar method again with the ikHide parameter

    ImageKit1.Edit.ShowToolBar ikHide 

4. To set the modifications that you made to the image data, you need to call the Modify method.....

    ImageKit1.Edit.Modify

then you can save the image as usual. Note that if you don't call the modify method, the changes that you made will not be permanent

5. To use the image editing toolbars functions without displaying the toolbar, you have to cheat alittle. You must set the Edit interface's EditEnable property to True then call the ShowToolBar method but before doing so, set the ToolBarLeft property (or ToolBarTop property) so the toolbar is displayed in a location well off the screen.

    ImageKit1.Edit.ToolBarLeft = -1000
    ImageKit1.Edit.EditEnable = True
    ImageKit1.Edit.ShowToolBar ikRaster

6. This program also shows how to use the ImageKit Control's SelEditFunc to set different cursors when editing functions are changed.



